// import { getSetting, chooseAddress, openSetting} from"../../utils/asyncWx.js";

Page({
  handleChooseAddress() {
    wx.getSetting({
      success: (result) => {
        const scopeAddress = result.authSetting["scope.address"];
        if (scopeAddress === true || scopeAddress === undefined) {
          wx.chooseAddress({
            success: (result1) => {
              console.log(result1);
            },
          });
        }else{
          wx.openSetting({
            success: (result2) => {
              wx.chooseAddress({
                success:(result3) => {
                  console.log(result3);
                },
              });
            },

          });
        }
      },
    })
  }
})